import {ylRequest} from './request'

// 获取banner数据
export function getReqBanner(type = 0) {
  return ylRequest.get({
    url: '/banner',
    data: {
      type
    }
  })
}
// 获取推荐数据
export function getReqRecommend(id) {
  return ylRequest.get({
    url: '/playlist/detail',
    data: {
      id
    }
  })
}
// 获取热门歌单
export function getReqHotSong(cat="全部",limit=6,offset=0) {
  return ylRequest.get({
    url: '/top/playlist',
    data: {
      cat,
      limit,
      offset
    }
  })
}

// 热门歌单分类
export function getReqHotSongCat() {
  return ylRequest.get({
    url: '/playlist/hot'
  })
}

// 歌曲详情
export function getReqDetailSong(id) {
  return ylRequest.get({
    url: '/playlist/detail',
    data: {
      id
    }
  })
}